package cn.huiyunche.base.service.vo;

import cn.huiyunche.base.service.enums.AccPaytypeEnum;

import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.util.Date;

public class CTurnoverVo {
    private Long id;
    private Long userId;

    private String userName;

    private Integer userType;

    private Long orderId;

    private BigDecimal orderFee;

    private BigDecimal orderActPay;

    private Integer payType;

    private Long billId;

    private Date createTime;

    private String remark;

    private Date updateTime;

    private Integer batchNo;

    private Integer isRt;

    private Long accountId;

    private String accountName;

    private BigDecimal orderPrice;

    private BigDecimal orderTotal;

    private int feetype;

    private Long bno;

    private String feeTypeDesc;

    private String strOrderTotal;

    private String orderCode;

    // 流水状态
    private int status;

    // 公司ID 
    private Long companyId;

    // 公司名称
    private String companyName;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName == null ? null : userName.trim();
    }

    public Integer getUserType() {
        return userType;
    }

    public void setUserType(Integer userType) {
        this.userType = userType;
    }

    public Long getOrderId() {
        return orderId;
    }

    public void setOrderId(Long orderId) {
        this.orderId = orderId;
    }

    public BigDecimal getOrderFee() {
        return orderFee;
    }

    public void setOrderFee(BigDecimal orderFee) {
        this.orderFee = orderFee;
    }

    public BigDecimal getOrderActPay() {
        return orderActPay;
    }

    public void setOrderActPay(BigDecimal orderActPay) {
        this.orderActPay = orderActPay;
    }

    public Integer getPayType() {
        return payType;
    }

    public void setPayType(Integer payType) {
        this.payType = payType;
    }

    public Long getBillId() {
        return billId;
    }

    public void setBillId(Long billId) {
        this.billId = billId;
    }

    public String getCreateTime() {
        SimpleDateFormat sf = new SimpleDateFormat("yyyy-MM-dd");
        return createTime == null ? "" : sf.format(createTime);
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public Integer getBatchNo() {
        return batchNo;
    }

    public void setBatchNo(Integer batchNo) {
        this.batchNo = batchNo;
    }

    public Integer getIsRt() {
        return isRt;
    }

    public void setIsRt(Integer isRt) {
        this.isRt = isRt;
    }

    public Long getAccountId() {
        return accountId;
    }

    public void setAccountId(Long accountId) {
        this.accountId = accountId;
    }

    public String getAccountName() {
        return accountName;
    }

    public void setAccountName(String accountName) {
        this.accountName = accountName;
    }

    public BigDecimal getOrderPrice() {
        return orderPrice;
    }

    public void setOrderPrice(BigDecimal orderPrice) {
        this.orderPrice = orderPrice;
    }

    public BigDecimal getOrderTotal() {
        return orderTotal;
    }

    public void setOrderTotal(BigDecimal orderTotal) {
        this.orderTotal = orderTotal;
    }

    public int getFeetype() {
        return feetype;
    }

    public void setFeetype(int feetype) {
        this.feetype = feetype;
    }

    public Long getBno() {
        return bno;
    }

    public void setBno(Long bno) {
        this.bno = bno;
    }

    public String getFeeTypeDesc() {
        String payTypedesc = AccPaytypeEnum.getByValue(payType).getText();
        if (AccPaytypeEnum.REWARD.getValue() == payType || AccPaytypeEnum.PUNISH.getValue() == payType) {
            return payType == null ? null : payTypedesc.concat(" ").concat(this.getRemark());
        } else {
            return payType == null ? null : payTypedesc;

        }
    }

    public void setFeeTypeDesc(String feeTypeDesc) {
        this.feeTypeDesc = feeTypeDesc;
    }

    public String getStrOrderTotal() {
        return strOrderTotal;
    }

    public void setStrOrderTotal(String strOrderTotal) {
        this.strOrderTotal = strOrderTotal;
    }

    public String getOrderCode() {
        return orderCode;
    }

    public void setOrderCode(String orderCode) {
        this.orderCode = orderCode;
    }

    public Long getCompanyId() {
        return companyId;
    }

    public void setCompanyId(Long companyId) {
        this.companyId = companyId;
    }

    public String getCompanyName() {
        return companyName;
    }

    public void setCompanyName(String companyName) {
        this.companyName = companyName;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    @Override
    public String toString() {
        return "CTurnoverVo{" +
                "id=" + id +
                ", userId=" + userId +
                ", userName='" + userName + '\'' +
                ", userType=" + userType +
                ", orderId=" + orderId +
                ", orderFee=" + orderFee +
                ", orderActPay=" + orderActPay +
                ", payType=" + payType +
                ", billId=" + billId +
                ", createTime=" + createTime +
                ", remark='" + remark + '\'' +
                ", updateTime=" + updateTime +
                ", batchNo=" + batchNo +
                ", isRt=" + isRt +
                ", accountId=" + accountId +
                ", accountName='" + accountName + '\'' +
                ", orderPrice=" + orderPrice +
                ", orderTotal=" + orderTotal +
                ", feetype=" + feetype +
                ", bno=" + bno +
                ", feeTypeDesc='" + feeTypeDesc + '\'' +
                ", strOrderTotal='" + strOrderTotal + '\'' +
                ", orderCode='" + orderCode + '\'' +
                ", status=" + status +
                ", companyId=" + companyId +
                ", companyName='" + companyName + '\'' +
                '}';
    }
}